---
id: 6568917528820d99236ad811
title: ステップ 10
challengeType: 20
dashedName: step-10
---

# --description--

Now, you need to go over each row in the sudoku board.

Enumeration is a convenient way to keep track of both the element and its position on a list. The `enumerate()` function is a built-in function in Python that takes an iterable (such as a list, tuple, or string) and returns an iterator that produces tuples containing indices and corresponding values from the iterable.

Initiate a `for` loop to iterate over each row (`line`) in the sudoku board (`self.board`).

Use enumeration to get both the index (`index`) and the content (`line`) of each row.

The general syntax would be like this:

```js
for x, y in enumerate(parameter):
```

# --hints--

You should have `for index, line in enumerate(self.board):` within the `__str__` method.

```js
assert.match(
  code,
  /for\s+(\w+)\s*,\s*(?!\1)(\w+)\s+in\s+enumerate\s*\(\s*self\.board\s*\)\s*:/m
);
```

# --seed--

## --seed-contents--

```py
class Board:
    def __init__(self, board):
        self.board = board

    def __str__(self):
        upper_lines = f'\n╔═══{"╤═══"*2}{"╦═══"}{"╤═══"*2}{"╦═══"}{"╤═══"*2}╗\n'
        middle_lines = f'╟───{"┼───"*2}{"╫───"}{"┼───"*2}{"╫───"}{"┼───"*2}╢\n'
        lower_lines = f'╚═══{"╧═══"*2}{"╩═══"}{"╧═══"*2}{"╩═══"}{"╧═══"*2}╝\n'
        board_string = upper_lines
--fcc-editable-region--

--fcc-editable-region--
```
